Data Types


Python provides following data types

  1. Basic Data Types:

    • Numbers (integer, real, complex, boolean ... )
    • Strings
  2. Complex data types such as collections:

    • List
    • Tuple
    • Dictionary

Just like Java data types in python are also of two types:

  • Mutable: Which allows the content of the variable to be changed, example: list, dictionary. (mostly complex datatype)
  • Immutable: Which do not allow the contents of variables to be changed, examples: string, integer etc (mostly basic datatype)

The data types which we are doing to discuss in this chapter are part of default implementation, so they are part of default python and no module is needed to be imported.